﻿@page
@{ Layout = "_Layout"; }

<el-card>
    <div slot="header" class="clearfix">
        <span>请选择一项评价</span>
        <el-button style="float: right;padding:3px 0;" type="text" v-on:click="utils.closeLayerSelf"><i class="el-icon-close"></i></el-button>
    </div>
    <el-form v-on:submit.native.prevent :inline="true" :size="euiSize">
        <el-form-item label="评价标题">
            <el-input v-model="formInline.keyword" placeholder="关键字" prefix-icon="el-icon-search" clearable></el-input>
        </el-form-item>
        <el-form-item>
            <el-button icon="el-icon-search" type="primary" v-on:click="btnSearchClick">查 询</el-button>
            <el-button plain icon="el-icon-plus" type="warning" v-on:click="btnEditClick(0)">新增评价</el-button>
        </el-form-item>
        <el-form-item>
        </el-form-item>
    </el-form>
    <el-table ref="table" :data="list" :size="euiSize" highlight-current-row :row-style="{ cursor: 'pointer' }" v-on:current-change="selectCurrentChange"
              style="width: 100%" :height="$(window).height()-220">
        <el-table-column label="#"
                         type="index"
                         width="60"
                         align="left">
            <template scope="scope">
                <span>{{(formInline.pageIndex - 1) * formInline.pageSize + scope.$index + 1}}</span>
            </template>
        </el-table-column>
        <el-table-column label="评价标题" show-overflow-tooltip prop="title">
            <template slot-scope="scope">
                <span>
                    <el-tag v-if="selectRow && selectRow.id===scope.row.id" type="success">已 选</el-tag>
                    {{ scope.row.title }}
                </span>
            </template>
        </el-table-column>
        <el-table-column label="评价项" width="85" prop="totalItem">
        </el-table-column>
        <el-table-column label="总分" prop="totalScore" width="85">
        </el-table-column>
        <el-table-column prop="createdDate" label="创建时间"
                         width="150">
        </el-table-column>
        <el-table-column label="状态" width="85">
            <template slot-scope="scope">
                <span v-if="scope.row.locked"><el-tag size="mini" type="danger" effect="dark">停 用</el-tag></span>
                <span v-else><el-tag size="mini" type="success" effect="dark">启 用</el-tag></span>
            </template>
        </el-table-column>
        <el-table-column width="100" align="right">
            <template slot-scope="scope">
                <el-dropdown :show-timeout="0" placement="left">
                    <el-button icon="el-icon-arrow-left" size="mini" v-on:click.stop="return false">
                        操作
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item icon="el-icon-view" v-on:click.native="btnViewClick(scope.row.id)">预览</el-dropdown-item>
                        <el-dropdown-item icon="el-icon-edit" v-on:click.native="btnEditClick(scope.row.id)">修改</el-dropdown-item>
                        <el-dropdown-item icon="el-icon-document-copy" v-on:click.native="btnCopyClick(scope.row.id)">复制</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </template>
        </el-table-column>
        @await Html.PartialAsync("_PartialTableEmpty")
    </el-table>
    <el-row style="margin-top:18px;">
        <el-col :span="12" align="left">
            <el-pagination v-on:current-change="handleCurrentChange" background
                           :current-page="formInline.pageIndex"
                           :page-size="formInline.pageSize"
                           layout="total, prev, pager, next, jumper"
                           :total="total">
            </el-pagination>
        </el-col>
        <el-col :span="12" align="right">
            <el-button icon="el-icon-check" type="primary" v-on:click="btnSelectConfirmClick" :size="euiSize">确 定</el-button>
            <el-button icon="el-icon-close" :size="euiSize" v-on:click="utils.closeLayerSelf">取 消</el-button>
        </el-col>
    </el-row>
</el-card>
@section Scripts{
    <script src="/sitefiles/assets/js/admin/study/studyCourseEvaluationSelect.js" type="text/javascript"></script>
}